
public class Utils {
	public static double[] calcCumulatives(double[] p) {
		int m = p.length;
		double[] q = new double[m];
		q[0] = 0;
		for (int i = 1; i < m; i++) {
			q[i] = q[i - 1] + p[i - 1];
		}
		return q;
	}
}
